fix: Falling Off Edge in Pet Puzzle #1584
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #547
Description: Modified PetComponents.cpp, dNavMesh.cpp and dNavMesh.h to include a new function nearest point which helps to prevent players from falling off a cliff or an edge when taming a pet. It will instead try to keep the player on the nearest navMesh (terrain)
Motivation and Context: Linked issue from EmosewaMC to work on
Type of Changes: Added new function to dNavMesh and its respective includes in dNavMesh.h. Made changes to petcomponent OnUse (which is used to start a player taming pet interaction).
How Has This Been Tested? : Taming a pet, such as the Goat in Forbidden Valley while on the edge of a cliff, which resulted in keeping the player as close to the edge as necessary to prevent them from falling off. This allows (assuming the camera angle and perspective does not get wacky, which is another WIP). Also testing taming pets right next to ledges, which prevents falling through the wall or clipping through the wall as previously reported.